package com.zuipin.service;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

import com.zuipin.entity.Member;
import com.zuipin.framework.exception.CustomException;
import com.zuipin.framework.result.PageResult;
import com.zuipin.framework.result.Result;
import com.zuipin.util.Pagination;
import com.zuipin.vo.BackMemberDetailVo;
import com.zuipin.vo.BackMemberVo;
import com.zuipin.vo.MemberSearchVo;

/**
 * 会员数据接口
 * 
 * @ClassName: IMemberService
 * @author wuyicheng
 * @time 2017年3月23日下午2:34:04
 */
public interface IMemberService {
	
	public Member findById(Long id);
	
	public Member findByMember(Member member);
	
	public List<Member> findList(Member member);
	
	public void insert(Member member);
	
	public void update(Member member);
	
	/** 
	 *
	 * @Title: deleteById 
	 * @author: wuyicheng
	 * @date: 2017年4月18日下午5:55:50 
	 * @param id
	 * @return: void
	 * @throws 
	 */
	public void deleteById(Long id);
	
	/**
	 * @throws ParseException 
	 * 
	 *
	 * @Title: sendMobileCode 
	 * @author: wuyicheng
	 * @date: 2017年4月24日下午6:45:39 
	 * @param mobilePhone
	 * @param smsAccount
	 * @param smsPassword
	 * @param sendFlag
	 * @param result
	 * @return
	 * @return: Result<Map<String,Object>>
	 * @throws
	 */
	public Result<Map<String, Object>> sendMobileCode(String mobilePhone, String smsAccount, String smsPassword, String sendFlag, Result<Map<String, Object>> result,
			String sendType, Long sysId) throws ParseException;
	
	/** 
	 * 根据登录名查询会员
	 * 
	 * @Title: findByLoginName 
	 * @author: wuyicheng
	 * @date: 2017年5月2日下午8:12:56 
	 * @param loginName
	 * @return
	 * @return: Member
	 * @throws 
	 */
	public Member findByLoginName(String loginName);
	
	/** 
	 * 根据会员id查询会员List
	 * 
	 * @Title: findByLoginName 
	 * @author: wuyicheng
	 * @date: 2017年5月2日下午8:12:56 
	 * @param loginName
	 * @return
	 * @return: Member
	 * @throws 
	 */
	public List<Member> findListMember(List<Long> ids);
	
	/** 
	 *
	 * @Title: updateByPrimaryKey 
	 * @author: wuyicheng
	 * @date: 2017年6月27日上午10:24:47 
	 * @param user
	 * @return: void
	 * @throws 
	 */
	public void updateByPrimaryKey(Member user);
	
	/**
	 * (后台)查询全部会员信息(可模糊查询)
	 * @param sysId
	 * @param search
	 * @param page
	 * @return
	 */
	public PageResult<List<BackMemberVo>> searchMemberAllByBack(Long sysId, MemberSearchVo search, Pagination page);
	
	/**
	 * （后台）查询详细会员详情
	 * @param memberId
	 * @param sysId
	 * @return
	 */
	public Result<BackMemberDetailVo> searchMemberByIdBack(Long memberId, Long sysId);
	
	/**
	 * （后台）修改会员信息
	 * @param backMemberDetailVo
	 * @return
	 */
	public Result modityMemberInformation(BackMemberDetailVo backMemberDetailVo) throws CustomException;
	
	/**
	 * (后台)禁用/启用 会员
	 * @param memberId
	 * @param sysId
	 * @param status
	 * @return
	 */
	public Result modityMemberStatus(Long memberId, Long sysId, String status, Long updateId);
	
	/**
	 * (后台)修改会员积分/余额
	 * @param memberId
	 * @param sysId
	 * @param integralOrBalance
	 * @param number
	 * @param remarks
	 * @return
	 */
	public Result modifyMemberIntegralOrBalance(Long memberId, Long sysId, String integralOrBalance, BigDecimal number, String remarks, Long updateId) throws CustomException;
	
}
